package general;

import java.util.Random;

public class GeneralTool 
{
	private static Random random = new Random();
	public static final double Deg2Rad = Math.PI/180;
	public static final double Rad2Deg = 180/Math.PI;
	
	public static int randomRange(int min,int max)
	{
		if(min > max)
			return randomRange(max, min);
		return random.nextInt(max - min) + min;
	}
	public static double randomRange(double min,double max)
	{
		if(min > max)
			return randomRange(max, min);
		return random.nextDouble() * (max - min) + min;
	}
}
